home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_023 / ver30 / tty / 7300 / ttykbd.c < prev   
C/C++ Source or Header  |  1992-05-06  |  1KB  |  57 lines

  1. /*
  2.  * Name:    MicroEMACS
  3.  *         AT&T UNIX PC 7300/3b1 terminal keyboard.
  4.  * Version:    29
  5.  * Last edit:    25-Apr-86
  6.  * By:        {sun, amdahl, mtxinu, cbosgd}!rtech!daveb
  7.  *
  8.  * This is presently a vanilla implementation, but may in time
  9.  * support function keys and mouse mapping.
  10.  */
  11. #include    "def.h"
  12.  
  13. /*
  14.  * Names for the keys with basic keycode
  15.  * between KFIRST and KLAST (inclusive). This is used by
  16.  * the key name routine in "kbd.c".
  17.  *
  18.  * It is presently unimplemented on the 7300 (daveb).
  19.  */
  20. char    *keystrings[] = {
  21.  
  22.     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  23.     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  24.     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  25.     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
  26. };
  27.  
  28.  
  29. /*
  30.  * Read in a key, doing the low level mapping
  31.  * of ASCII code to 11 bit code.
  32.  */
  33. getkbd()
  34. {
  35.     register int    c;
  36.     register int    n;
  37.  
  38.     c = ttgetc();
  39.     if (c == Esc) {
  40.         c = ttgetc();
  41.         if (ISLOWER(c) != FALSE)    /* Copy the standard    */
  42.             c = TOUPPER(c);        /* META code.        */
  43.         if (c>=0x00 && c<=0x1F)
  44.             c = KCTRL | (c+'@');
  45.         return (KMETA | c);
  46.     }
  47.     return (c);
  48. }
  49.  
  50.  
  51. /*
  52.  * Terminal specific keymap initialization.
  53.  */
  54. ttykeymapinit()
  55. {
  56. }
  57.